package com.social.serviceImpl;

import com.social.dao.UserPostMapper;
import com.social.pojo.UserPostKey;
import com.social.service.UserPostService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserPostServiceImpl implements UserPostService {
    @Autowired
    private UserPostMapper userPostMapper;

    @Override
    public int update(Integer pId, Integer id) {
        int status = userPostMapper.update(pId, id);
        return status;
    }

    @Override
    public int deleteByPrimaryKey(UserPostKey key) {
        int status = userPostMapper.deleteByPrimaryKey(key);
        return status;
    }

    @Override
    public int insert(UserPostKey record) {
        int status = userPostMapper.insert(record);
        return status;
    }

    @Override
    public int insertSelective(UserPostKey record) {
        int status = userPostMapper.insertSelective(record);
        return status;
    }
}